package com.resou.reader.api.entry;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by ${Garrett} on 2018/9/19.
 * Contact me krouky@outlook.com
 */
public class PayConfigBean implements Parcelable {
    /**
     * id : 12
     * createBy : admin
     * createDate : 1535789823000
     * updateBy : null
     * updateDate : null
     * bookBean : 100
     * giftBean : 100
     * cnyPrice : 1
     * ratio : 1
     * deleteStatus : 0
     */

    private int id;
    private String createBy;
    private long createDate;
    private Object updateBy;
    private Object updateDate;
    private double bookBean;//热币数量
    private double giftBean;//赠送热券
    private double cnyPrice;//人民币价格
    private String ratio;//赠送占比  1.00不打折，0.95为9.5折
    private int deleteStatus;

    /**
     * 角标，0标识无角标，1代表首充
     */
    private int superscript;

    protected PayConfigBean(Parcel in) {
        id = in.readInt();
        createBy = in.readString();
        createDate = in.readLong();
        bookBean = in.readDouble();
        giftBean = in.readDouble();
        cnyPrice = in.readDouble();
        ratio = in.readString();
        deleteStatus = in.readInt();
        superscript = in.readInt();
    }

    public static final Creator<PayConfigBean> CREATOR = new Creator<PayConfigBean>() {
        @Override
        public PayConfigBean createFromParcel(Parcel in) {
            return new PayConfigBean(in);
        }

        @Override
        public PayConfigBean[] newArray(int size) {
            return new PayConfigBean[size];
        }
    };

    public int getSuperscript() {
        return superscript;
    }

    public void setSuperscript(int superscript) {
        this.superscript = superscript;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public long getCreateDate() {
        return createDate;
    }

    public void setCreateDate(long createDate) {
        this.createDate = createDate;
    }

    public Object getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Object updateBy) {
        this.updateBy = updateBy;
    }

    public Object getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Object updateDate) {
        this.updateDate = updateDate;
    }

    public double getBookBean() {
        return bookBean;
    }

    public void setBookBean(double bookBean) {
        this.bookBean = bookBean;
    }

    public double getGiftBean() {
        return giftBean;
    }

    public void setGiftBean(double giftBean) {
        this.giftBean = giftBean;
    }

    public double getCnyPrice() {
        return cnyPrice;
    }

    public void setCnyPrice(int cnyPrice) {
        this.cnyPrice = cnyPrice;
    }

    public String getRatio() {
        return ratio;
    }

    public void setRatio(String ratio) {
        this.ratio = ratio;
    }

    public int getDeleteStatus() {
        return deleteStatus;
    }

    public void setDeleteStatus(int deleteStatus) {
        this.deleteStatus = deleteStatus;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(createBy);
        dest.writeLong(createDate);
        dest.writeDouble(bookBean);
        dest.writeDouble(giftBean);
        dest.writeDouble(cnyPrice);
        dest.writeString(ratio);
        dest.writeInt(deleteStatus);
        dest.writeInt(superscript);
    }
}
